package com.bridgeintelligent.tag.remotefile;

import org.springframework.web.multipart.MultipartFile;

public interface RemoteFileHandler {

    public String upload(String localFilename, String fileName);

    /**
     * 指定图片名称
     *
     * @param localFilename
     * @param picName       上传后文件名称
     * @return
     */
    public String uploadFile(String localFilename, String picName);

    public String download(String remoteFilename);

    public byte[] downloadForByte(String remoteFilename);

    public String writeLocal(MultipartFile file);

    public String writeLocalWithFileName(MultipartFile file,String fileName);

    /**
     * 成功返回 0 ，失败返回 非0
     *
     * @param remoteFilename
     * @return
     */
    public int delete(String remoteFilename);

    String uploadWithActivity(String localFilename, String activityId);

    String uploadWhiteList(String localFileName, String activityId);

    int delDirectory(String directoryName);

    String getRemoteFile(String remoteFilename);

    default String writeByPath(MultipartFile file,String path, String fileName){
        return null;
    }

    default String getPath(String path){
        return null;
    }

    default String getParentPath(String activityId){
        return null;
    }

    default String uploadByPath(String localFilename, String path, String fileName){
        return null;
    }
}
